﻿using SimpleInjector;
using SimpleInjector.Packaging;
using YuYuKiCms.Dal.Interface;
using YuYuKiCms.Dal.Model;
using YuYuKiCms.Dal.Repository;
using YuYuKiCms.Framework.DI;

namespace YuYuKiCms.Dal.DI
{
    public class DalServices : IPackage
    {
        #region Implementation of IPackage

        /// <summary>
        ///     Registers the set of services in the specified <paramref name="container" />.
        /// </summary>
        /// <param name="container">The container the set of services is registered into.</param>
        public void RegisterServices(Container container)
        {
            container.Register<IYuyukiModelUnitOfWork>(() => new YuyukiModel(), HybridLifeStyle.LifeStyle);
            container.Register<IPageRepository, PageRepository>(HybridLifeStyle.LifeStyle);
            container.Register<IThemeRepository, ThemeRepository>(HybridLifeStyle.LifeStyle);
            container.Register<IUserAccountRepository, UserAccountRepository>(HybridLifeStyle.LifeStyle);
        }

        #endregion
    }
}